# hash:sha256:5c7aceea9d298095dcb935851e14f24bd27076a81fb8264131f193858500f8c0
FROM registry.codeocean.com/codeocean/r-studio:2022.07.0-548-r4.2.1-ubuntu18.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        cmake=3.10.2-1ubuntu2.18.04.2 \
        gcc=4:7.4.0-1ubuntu2.3 \
    && rm -rf /var/lib/apt/lists/*

RUN Rscript -e 'remotes::install_version("Matrix", "1.6-0")' \
    && Rscript -e 'remotes::install_version("SimDesign", "2.15.1")' \
    && Rscript -e 'remotes::install_version("Synth", "1.1-8")' \
    && Rscript -e 'remotes::install_version("TTR", "0.24.4")' \
    && Rscript -e 'remotes::install_version("dplyr", "1.1.4")' \
    && Rscript -e 'remotes::install_version("dtw", "1.23-1")' \
    && Rscript -e 'remotes::install_version("emojifont", "0.5.5")' \
    && Rscript -e 'remotes::install_version("forecast", "8.21.1")' \
    && Rscript -e 'remotes::install_version("furrr", "0.3.1")' \
    && Rscript -e 'remotes::install_version("ggplot2", "3.4.3")' \
    && Rscript -e 'remotes::install_version("ggpubr", "0.6.0")' \
    && Rscript -e 'remotes::install_version("gridExtra", "2.3")' \
    && Rscript -e 'remotes::install_version("magrittr", "2.0.3")' \
    && Rscript -e 'remotes::install_version("purrr", "1.0.2")' \
    && Rscript -e 'remotes::install_version("reshape2", "1.4.4")' \
    && Rscript -e 'remotes::install_version("signal", "0.7-7")' \
    && Rscript -e 'remotes::install_version("zoo", "1.8-12")'

COPY postInstall /
RUN /postInstall
